//
//  SectionOneTableViewCell.m
//  FitTime
//
//  Created by dllo on 16/4/3.
//  Copyright © 2016年 赵建平. All rights reserved.
//

#import "SectionOneTableViewCell.h"

@implementation SectionOneTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.headImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.headImageView];
        
        self.nameLable = [[UILabel alloc] init];
        [self.contentView addSubview:self.nameLable];
        
        self.introduceLable = [[UILabel alloc] init];
        [self.contentView addSubview:self.introduceLable];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.headImageView.frame = CGRectMake(10, 10, self.contentView.frame.size.height -20, self.contentView.frame.size.height -20);
    
    self.headImageView.layer.cornerRadius = self.headImageView.frame.size.width / 2;
    self.headImageView.layer.masksToBounds = YES;
    
    [self.nameLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.headImageView.mas_right).offset(10);
        make.top.equalTo(self.contentView.mas_top).offset(20);
        make.height.equalTo(@20);
    }];
    
    [self.introduceLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.headImageView.mas_right).offset(10);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(-10);
        make.top.equalTo(self.nameLable.mas_bottom).offset(10);
    }];
    
//    self.headImageView.backgroundColor = [UIColor redColor];
//    self.nameLable.backgroundColor = [UIColor yellowColor];
//    self.introduceLable.backgroundColor = [UIColor greenColor];
    
}



@end
